Cleanup DAP state before installing new OTA Test: th Bug: 229708688 Change-Id: Icf7ca0fac104feeddc759c580b5bcb45ffd727d6 (cherry picked from commit 42c2d55eb6df1810ca1030a520ca4d32340ecb7b) Merged-In: Icf7ca0fac104feeddc759c580b5bcb45ffd727d6
diff --git a/aosp/update_attempter_android.cc b/aosp/update_attempter_android.cc index a3485ea..1d35b5e 100644 --- a/aosp/update_attempter_android.cc +++ b/aosp/update_attempter_android.cc
@@ -263,6 +263,7 @@ install_plan_.is_resume = !payload_id.empty() && DeltaPerformer::CanResumeUpdate(prefs_, payload_id); if (!install_plan_.is_resume) { + boot_control_->GetDynamicPartitionControl()->Cleanup(); // No need to reset dynamic_partititon_metadata_updated. If previous calls // to AllocateSpaceForPayload uses the same payload_id, reuse preallocated // space. Otherwise, DeltaPerformer re-allocates space when the payload is